#include <iostream>
#include <cmath>
using namespace std;
class Rectangle {
private:
    int length;
    int width;
public:
    Rectangle(int xx, int yy);
	Rectangle();
	Rectangle(const Rectangle &p);
	int getL(){return length;}
	int getW(){return width;}
	void show(){cout<<"rectangle"<<"("<<length<<","<<width<<")";} 
	~Rectangle(){show();cout<<" is eliminated"<<endl;}
};
Rectangle::Rectangle(const Rectangle &r):length(r.length),width(r.width){
	cout<<"calling the copy constructor of rectangle"<<endl;
}
Rectangle::Rectangle(int l,int y):length(l),width(y){
	cout<<"calling the constructor of rectangle"<<endl;
	show();
	cout<<" is created"<<endl;	
}
Rectangle::Rectangle():length(1),width(1){
	cout<<"calling the default constructor"<<endl;
	show();
	cout<<" is created"<<endl;
	
}
int main() {
    Rectangle a1[2]={Rectangle(3,4)};
    Rectangle a2[3]={a1[1],Rectangle(5,6)};
    return 0;
}
